    function loadScript(url, callback) {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        if (script.readyState) {
        script.onreadystatechange = function () {
        if (script.readyState == 'loaded' || script.readyState == 'complete') {
            script.onreadystatechange = null;
            callback();
            }
            };
        } else { // others
            script.onload = function () {
             callback();
            };
        }
        script.src = url;
        document.body.appendChild(script);
    }
    loadScript('http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js', function () {
        var  el2 = document.createElement('script');
        el2.src = './demo.js';
        document.getElementsByTagName('head')[0].appendChild(el2)
    });